<script>
  init({
    title: 'Reorder Columns',
    desc: 'Use Plugin: <a href="https://github.com/akottr/dragtable/" target="_blank">dragtable</a> and bootstrap-table-reorder-columns.',
    links: [
      'https://rawgit.com/akottr/dragtable/master/dragtable.css',
      'bootstrap-table.min.css'
    ],
    scripts: [
      'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js',
      'https://rawgit.com/akottr/dragtable/master/jquery.dragtable.js',
      'bootstrap-table.min.js',
      'extensions/reorder-columns/bootstrap-table-reorder-columns.min.js'
    ]
  })
</script>

<table
  id="table"
  data-show-columns="true"
  data-search="true"
  data-show-toggle="true"
  data-pagination="true"
  data-url="json/data1.json"
  data-reorderable-columns="true">
  <thead>
  <tr>
    <th data-field="id" data-sortable="true">ID</th>
    <th data-field="name" data-sortable="true">Item Name</th>
    <th data-field="price" data-sortable="true">Item Price</th>
  </tr>
  </thead>
</table>

<script>
  function mounted() {
    $('#table').bootstrapTable()
  }
</script>
